package com.pig4cloud.pigx.contract.mongo.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pig4cloud.pigx.common.customize.contants.MongoTableNameConstants;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.math.BigDecimal;

/**
 * 币对层级表mongodb实体类
 *
 * @since 2022/8/12 14:21
 */
@Data
@Document(MongoTableNameConstants.CONTRACT_SYMBOL_HIERARCHY)
public class ContractSymbolHierarchyMongo {

	/**
	 * 主键
	 */
	@Id
	private Long id;

	/**
	 * 币对id
	 */
	private Long symbolId;

	/**
	 * 币对名称
	 */
	private String symbolName;

	/**
	 * 层级
	 */
	private Integer hierarchy;

	/**
	 * 最低杠杆倍数
	 */
	private Integer startMultiple;

	/**
	 * 最高杠杆倍数
	 */
	private Integer endMultiple;

	/**
	 * 最低持仓量(币本位数量)
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal minPosition;

	/**
	 * 最高持仓量(币本位数量)
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal maxPosition;
}
